home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
archivers
/
headbanger
/
archbanger
next >
Wrap
AmigaDOS Script File
|
1999-05-25
|
1KB
|
50 lines
.key com/a,infile/a,outfile
.bra {
.ket }
; $VER: Archbanger v0.1
; archiver script with headbanger
; parameters are:
; com/a - command (c-comress, d-decompress), required
; infile/a - input file- (or directory-) name, required
; outfile - output filename, not required, derived then from infile
FailAt 21
IF "{com}" EQ "c"
Echo "Compressing {infile}..."
delete >NIL: {infile}.tmp
lha a -r -z {infile}.tmp {infile}
IF EXISTS {infile}.tmp
IF "" EQ "{outfile}"
headbanger c {infile}.tmp maxnibble 1048576
delete >NIL: {infile}.hdbg
rename {infile}.tmp.hdbg {infile}.hdbg
delete >NIL: {infile}.tmp
ELSE
headbanger c {infile).tmp {outfile}
delete >NIL: {infile}.tmp
ENDIF
ELSE
Echo "Cannot find {infile}"
ENDIF
ELSE
IF "{com}" EQ "d"
Echo "Decompressing {infile}..."
headbanger d {infile} {infile}.tmp
IF EXISTS {infile}.tmp
lha x {infile}.tmp
delete >NIL: {infile}.tmp
ENDIF
ELSE
Echo "Wrong command!"
ENDIF
ENDIF